﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleLoops
{
    class Program
    {
        static void Main(string[] args)
        {
            int minValue = 0;
            int maxValue = 10;
            Random a = new Random();

            int b = a.Next(minValue, maxValue);
            int c = -1;
            for (int ctr = 1; ctr <= 5; ctr++)
            {
                Console.WriteLine("Please, input number from " + minValue + " to " + maxValue);
                c = Convert.ToInt32(Console.ReadLine());
                if (c == b)
                {
                    Console.WriteLine("Number has been guessed ");
                    break;
                }
                else if (c < b)
                {
                    Console.WriteLine("Number is lesser than specified");
                }
                else if (c > b)
                {
                    Console.WriteLine("Number is greater than specified");
                }
            }
            if (c!= b)
            {
                Console.WriteLine("Number has not beed guessed, please try again later");
            }
            Console.ReadLine();
        }
    }
}
